module.exports = options =>{
    return async function auth(ctx, next) {
        if(!ctx.session.id)  ctx.redirect("/login");
        await next();
    }
};
